package com.atguigu.spzx.model.entity.system;

import com.atguigu.spzx.model.entity.system.SysUser;

/**
 * @Author yaya
 * @Create 2024/6/21 16:02
 * Description:
 */

public class SysUserAuthContextUtil {
    private static ThreadLocal<SysUser> userThreadLocal = new ThreadLocal<>();

    public static void set(SysUser sysUser){
        userThreadLocal.set(sysUser);
    }

    public static SysUser get(){
        return userThreadLocal.get();
    }

    public static void remove(){
        userThreadLocal.remove();
    }
}
